In cryptography, a stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream (key stream). In a stream cipher each plaintext digit is encrypted one at a time with the corresponding digit of the key stream to produce a digit of the cipher text stream. A digit is typically a bit and the combining operation can be an exclusive-or (XOR). The pseudorandom key stream is typically generated serially from a random seed value using digital shift registers. The seed value serves as the cryptographic key for decrypting the cipher text stream.
Stream ciphers can be implemented in software. However, a complicated stream cipher can use over a hundred lines of C code. Even for optimized assembly code, a large number of cycles may be needed to produce a byte of key stream for a complicated stream cipher. Moreover, software implementations generally involve a large number memory access. Thus, software implementations do not provide sufficient speed and energy efficiency for a wide range of applications.